import piniaStore from '@/store'

export default function checkPermission(policy: string) {
  if (policy === '') return true
  const abpConfig = piniaStore.permissionStore.abpConfig
  if (abpConfig.auth.grantedPolicies[policy]) {
    return true
  } else {
    return false
  }
}
